<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>YQL webservice composer</title>
    <style>
    td, div, p, a { font-family: arial; font-size: 14px; }
    .header { font-weight: bold; font-size: 18px; }
    textarea { width: 800px; height: 220px; border: 1px solid gray; }
    </style>
  </head>
<body>
<table width="100%">
<tr><td class="header" width="500">YQL webservice composer </td></tr>
<tr><td>
Welcome to YQL webservice composer! You can use YQL as webservice using this service.
WSDL for the composer is  <a href="/yql?wsdl" target="_blank">here</a>
<br/><br/>
Example request:
<br/>
<textarea>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:orangescape">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:Yql>
         <urn:q>select * from yahoo.finance.quotes where symbol = "GOOG"</urn:q>
         <urn:env>http://datatables.org/alltables.env</urn:env>
      </urn:Yql>
   </soapenv:Body>
</soapenv:Envelope>
</textarea>
<br/><br/>
Example response:
<br/>
<textarea>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:orangescape">
   <soapenv:Header/>
   <soapenv:Body>
      <quote symbol="GOOG">
         <Ask>479.67</Ask>
         <AverageDailyVolume>2711860</AverageDailyVolume>
         <Bid>479.36</Bid>
         <AskRealtime>479.67</AskRealtime>
         <BidRealtime>479.36</BidRealtime>
         <BookValue>127.468</BookValue>
         <Change_PercentChange>-0.91 - -0.19%</Change_PercentChange>
         <Change>-0.91</Change>
         <Commission/>
         <ChangeRealtime>-0.91</ChangeRealtime>
         <AfterHoursChangeRealtime>N/A - N/A</AfterHoursChangeRealtime>
         <DividendShare>0.00</DividendShare>
         <LastTradeDate>9/15/2010</LastTradeDate>
         <TradeDate/>
         <EarningsShare>23.025</EarningsShare>
         <ErrorIndicationreturnedforsymbolchangedinvalid>N/A</ErrorIndicationreturnedforsymbolchangedinvalid>
         <EPSEstimateCurrentYear>27.27</EPSEstimateCurrentYear>
         <EPSEstimateNextYear>31.33</EPSEstimateNextYear>
         <EPSEstimateNextQuarter>7.50</EPSEstimateNextQuarter>
         <DaysLow>478.51</DaysLow>
         <DaysHigh>480.01</DaysHigh>
         <YearLow>433.63</YearLow>
         <YearHigh>629.51</YearHigh>
         <HoldingsGainPercent>- - -</HoldingsGainPercent>
         <AnnualizedGain>-</AnnualizedGain>
         <HoldingsGain/>
         <HoldingsGainPercentRealtime>N/A - N/A</HoldingsGainPercentRealtime>
         <HoldingsGainRealtime/>
         <MoreInfo>cnprmiIed</MoreInfo>
         <OrderBookRealtime>N/A</OrderBookRealtime>
         <MarketCapitalization>152.8B</MarketCapitalization>
         <MarketCapRealtime/>
         <EBITDA>10.825B</EBITDA>
         <ChangeFromYearLow>+45.89</ChangeFromYearLow>
         <PercentChangeFromYearLow>+10.58%</PercentChangeFromYearLow>
         <LastTradeRealtimeWithTime>N/A - &lt;b>479.52&lt;/b></LastTradeRealtimeWithTime>
         <ChangePercentRealtime>N/A - -0.19%</ChangePercentRealtime>
         <ChangeFromYearHigh>-149.99</ChangeFromYearHigh>
         <PercebtChangeFromYearHigh>-23.83%</PercebtChangeFromYearHigh>
         <LastTradeWithTime>9:33am - &lt;b>479.52&lt;/b></LastTradeWithTime>
         <LastTradePriceOnly>479.52</LastTradePriceOnly>
         <HighLimit/>
         <LowLimit/>
         <DaysRange>478.51 - 480.01</DaysRange>
         <DaysRangeRealtime>N/A - N/A</DaysRangeRealtime>
         <FiftydayMovingAverage>478.458</FiftydayMovingAverage>
         <TwoHundreddayMovingAverage>506.869</TwoHundreddayMovingAverage>
         <ChangeFromTwoHundreddayMovingAverage>-27.349</ChangeFromTwoHundreddayMovingAverage>
         <PercentChangeFromTwoHundreddayMovingAverage>-5.40%</PercentChangeFromTwoHundreddayMovingAverage>
         <ChangeFromFiftydayMovingAverage>+1.062</ChangeFromFiftydayMovingAverage>
         <PercentChangeFromFiftydayMovingAverage>+0.22%</PercentChangeFromFiftydayMovingAverage>
         <Name>Google Inc.</Name>
         <Notes>-</Notes>
         <Open>480.00</Open>
         <PreviousClose>480.43</PreviousClose>
         <PricePaid/>
         <ChangeinPercent>-0.19%</ChangeinPercent>
         <PriceSales>5.84</PriceSales>
         <PriceBook>3.77</PriceBook>
         <ExDividendDate>N/A</ExDividendDate>
         <PERatio>20.87</PERatio>
         <DividendPayDate>N/A</DividendPayDate>
         <PERatioRealtime/>
         <PEGRatio>1.08</PEGRatio>
         <PriceEPSEstimateCurrentYear>17.62</PriceEPSEstimateCurrentYear>
         <PriceEPSEstimateNextYear>15.33</PriceEPSEstimateNextYear>
         <Symbol>GOOG</Symbol>
         <SharesOwned/>
         <ShortRatio>1.60</ShortRatio>
         <LastTradeTime>9:33am</LastTradeTime>
         <TickerTrend>&amp;nbsp;-+++--&amp;nbsp;</TickerTrend>
         <OneyrTargetPrice>618.83</OneyrTargetPrice>
         <Volume>60699</Volume>
         <HoldingsValue/>
         <HoldingsValueRealtime/>
         <YearRange>433.63 - 629.51</YearRange>
         <DaysValueChange>- - -0.19%</DaysValueChange>
         <DaysValueChangeRealtime>N/A - N/A</DaysValueChangeRealtime>
         <StockExchange>NasdaqNM</StockExchange>
         <DividendYield/>
         <PercentChange>-0.19%</PercentChange>
      </quote>
   </soapenv:Body>
</soapenv:Envelope>
</textarea>
</td></tr>
<tr><td> <a href="/yql?wsdl">View WSDL</a></td></tr>
</tr>
</table>
</body>
</html>